{"version":3,"sources":["jsdelivr-header.js","/npm/github-url-from-username-repo@1.0.2/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACJA,SAAS,OAAQ,EAAG,GAClB,OAAK,GAUD,gDAAgD,KAAK,IACnD,IACF,EAAI,EAAE,QAAQ,IAAK,WACd,sBAAwB,GAblB,IAiBjB,CApBA,OAAO,QAAU","file":"/npm/github-url-from-username-repo@1.0.2/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/github-url-from-username-repo@1.0.2/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","module.exports = getUrl\n\nfunction getUrl (r, forBrowser) {\n  if (!r) return null\n  // Regex taken from https://github.com/npm/npm-package-arg/commit/01dce583c64afae07b66a2a8a6033aeba871c3cd\n  // Note: This does not fully test the git ref format.\n  // See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html\n  //\n  // The only way to do this properly would be to shell out to\n  // git-check-ref-format, and as this is a fast sync function,\n  // we don't want to do that. Just let git fail if it turns\n  // out that the commit-ish is invalid.\n  // GH usernames cannot start with . or -\n  if (/^[^@%\\/\\s\\.-][^:@%\\/\\s]*\\/[^@\\s\\/%]+(?:#.*)?$/.test(r)) {\n    if (forBrowser)\n      r = r.replace(\"#\", \"/tree/\")\n    return \"https://github.com/\" + r\n  }\n\n  return null\n}\n"]}