{"version":3,"sources":["jsdelivr-header.js","/npm/octokit-plugin-get-open-repository-issues-count-by-assignees@1.0.1/dist-src/version.js","/npm/octokit-plugin-get-open-repository-issues-count-by-assignees@1.0.1/dist-src/compose-get-open-repository-issues-count-by-assignees.js","/npm/octokit-plugin-get-open-repository-issues-count-by-assignees@1.0.1/dist-src/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,oECNO,MAAM,QAAU,Q,kvBCCvB,MAAM,sBAAwB,2CAC9B,eAAsB,+CAA+C,GAAS,MAAE,EAAF,KAAS,EAAT,UAAe,IACzF,MAAM,EAAmB,EAAU,QAAQ,IAAW,sBAAsB,KAAK,KACjF,GAAI,EAAiB,OACjB,MAAM,IAAI,MAAO,qFAAoF,EAAiB,KAAK,SAE/H,MACM,EAAS,sGADQ,EAAU,KAAI,CAAC,EAAO,IAAW,SAAQ,oDAAwD,wBAInG,KAAK,qCAIlB,WAAY,SAAiB,EAAQ,QAAQ,EAAO,CAAE,QAAO,SACrE,OAAO,OAAO,QAAQ,GAAQ,QAAO,CAAC,GAAmB,GAAO,kBAC5D,MAAM,EAAQ,OAAO,EAAI,OAAO,IAChC,OAAA,8BAAA,GACO,GADP,IAEI,CAAC,EAAU,IAAS,GAFxB,GAID,GACN,CChBD,SAAgB,wCAAwC,GACpD,MAAO,CACH,wCAAyC,+CAA+C,KAAK,KAAM,GAE1G,CACD,wCAAwC,QFZjB,Q","file":"/npm/octokit-plugin-get-open-repository-issues-count-by-assignees@1.0.1/dist-node/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/octokit-plugin-get-open-repository-issues-count-by-assignees@1.0.1/dist-node/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","export const VERSION = \"1.0.1\";\n","// Credit: https://github.com/shinnn/github-username-regex/\nconst GITHUB_USERNAME_REGEX = /^[a-z\\d](?:[a-z\\d]|-(?=[a-z\\d])){0,38}$/i;\nexport async function composeGetOpenRepositoryIssuesCountByAssignees(octokit, { owner, repo, assignees }) {\n    const invalidUsernames = assignees.filter((login) => !GITHUB_USERNAME_REGEX.test(login));\n    if (invalidUsernames.length) {\n        throw new Error(`[octokit-plugin-get-open-repository-issues-count-by-assignees] Invalid usernames: ${invalidUsernames.join(\", \")}`);\n    }\n    const userIssuesNode = assignees.map((login, index) => `issues${index}:issues(first:1,states:OPEN,filterBy:{assignee:\"${login}\"}) { totalCount }`);\n    const query = `\n    query($owner:String!,$repo:String!) {\n      repository(owner:$owner, name:$repo) {\n        ${userIssuesNode.join(\"\\n        \")}\n      }\n    }\n  `;\n    const { repository: result } = await octokit.graphql(query, { owner, repo });\n    return Object.entries(result).reduce((countByAssignees, [key, { totalCount }]) => {\n        const index = Number(key.substr(\"issues\".length));\n        return {\n            ...countByAssignees,\n            [assignees[index]]: totalCount,\n        };\n    }, {});\n}\n","import { VERSION } from \"./version\";\nimport { composeGetOpenRepositoryIssuesCountByAssignees } from \"./compose-get-open-repository-issues-count-by-assignees\";\nexport { composeGetOpenRepositoryIssuesCountByAssignees, } from \"./compose-get-open-repository-issues-count-by-assignees\";\n/**\n * @param octokit Octokit instance\n * @param options Options passed to Octokit constructor\n */\nexport function getOpenRepositoryIssuesCountByAssignees(octokit) {\n    return {\n        getOpenRepositoryIssuesCountByAssignees: composeGetOpenRepositoryIssuesCountByAssignees.bind(null, octokit),\n    };\n}\ngetOpenRepositoryIssuesCountByAssignees.VERSION = VERSION;\n"]}