{"version":3,"sources":["jsdelivr-header.js","/npm/@pnpm/pick-fetcher@1001.0.0/lib/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAIA,SAAS,YAAY,EAAsB,GACvC,IAAI,EAAc,EAAW,KACN,MAAnB,EAAW,OAEP,EADA,EAAW,QAAQ,WAAW,SAChB,eAET,kBAAkB,EAAW,SACpB,mBAGA,iBAGtB,MAAM,EAAQ,EAAqB,GACnC,IAAK,EACD,MAAM,IAAI,MAAM,iCAAiC,EAAW,MAAQ,iCAExE,OAAO,CACX,CACA,SAAS,kBAAkB,GACvB,OAAQ,EAAI,WAAW,iCACnB,EAAI,WAAW,2BACf,EAAI,WAAW,yBAA2B,EAAI,SAAS,SAC/D,CA1BA,OAAO,eAAe,QAAS,aAAc,CAAE,OAAO,IACtD,QAAQ,YAAc,YACtB,QAAQ,kBAAoB","file":"/npm/@pnpm/pick-fetcher@1001.0.0/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@pnpm/pick-fetcher@1001.0.0/lib/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","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.pickFetcher = pickFetcher;\nexports.isGitHostedPkgUrl = isGitHostedPkgUrl;\nfunction pickFetcher(fetcherByHostingType, resolution) {\n    let fetcherType = resolution.type;\n    if (resolution.type == null) {\n        if (resolution.tarball.startsWith('file:')) {\n            fetcherType = 'localTarball';\n        }\n        else if (isGitHostedPkgUrl(resolution.tarball)) {\n            fetcherType = 'gitHostedTarball';\n        }\n        else {\n            fetcherType = 'remoteTarball';\n        }\n    }\n    const fetch = fetcherByHostingType[fetcherType];\n    if (!fetch) {\n        throw new Error(`Fetching for dependency type \"${resolution.type ?? 'undefined'}\" is not supported`);\n    }\n    return fetch;\n}\nfunction isGitHostedPkgUrl(url) {\n    return (url.startsWith('https://codeload.github.com/') ||\n        url.startsWith('https://bitbucket.org/') ||\n        url.startsWith('https://gitlab.com/')) && url.includes('tar.gz');\n}\n"]}