{"version":3,"sources":["jsdelivr-header.js","/npm/lazy-cache@2.0.2/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,IAAI,IAAM,QAAQ,cAkBlB,SAAS,UAAU,GACjB,IAAI,EAAQ,CAAC,EAEb,OAAO,SAAS,EAAM,EAAM,GAC1B,IAAI,EAAM,EAQV,SAAS,IACP,OAAO,EAAM,KAAS,EAAM,GAAO,EAAU,GAC/C,CAQA,MAfmB,iBAAR,IACT,EAAM,UAAU,IASd,OAAO,QAAQ,MACjB,IAGF,IAAI,EAAO,EAAK,GACT,CACT,CACF,CAMA,SAAS,OAAO,GACd,MAAsB,SAAf,EAAI,SAAoC,IAAf,EAAI,QAAmB,EAAI,MAC7D,CAMA,SAAS,UAAU,GACjB,OAAmB,IAAf,EAAI,OACC,EAAI,eAEb,EAAM,EAAI,QAAQ,mBAAoB,IAAI,eAC/B,QAAQ,iBAAiB,SAAS,EAAG,GAC9C,OAAO,EAAG,aACZ,GACF,CAMA,OAAO,QAAU","file":"/npm/lazy-cache@2.0.2/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/lazy-cache@2.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","'use strict';\n\nvar set = require('set-getter');\n\n/**\n * Cache results of the first function call to ensure only calling once.\n *\n * ```js\n * var utils = require('lazy-cache')(require);\n * // cache the call to `require('ansi-yellow')`\n * utils('ansi-yellow', 'yellow');\n * // use `ansi-yellow`\n * console.log(utils.yellow('this is yellow'));\n * ```\n *\n * @param  {Function} `fn` Function that will be called only once.\n * @return {Function} Function that can be called to get the cached function\n * @api public\n */\n\nfunction lazyCache(requireFn) {\n  var cache = {};\n\n  return function proxy(name, alias) {\n    var key = alias;\n\n    // camel-case the module `name` if `alias` is not defined\n    if (typeof key !== 'string') {\n      key = camelcase(name);\n    }\n\n    // create a getter to lazily invoke the module the first time it's called\n    function getter() {\n      return cache[key] || (cache[key] = requireFn(name));\n    }\n\n    // trip the getter if `process.env.UNLAZY` is defined\n    if (unlazy(process.env)) {\n      getter();\n    }\n\n    set(proxy, key, getter);\n    return getter;\n  };\n}\n\n/**\n * Return true if `process.env.LAZY` is true, or travis is running.\n */\n\nfunction unlazy(env) {\n  return env.UNLAZY === 'true' || env.UNLAZY === true || env.TRAVIS;\n}\n\n/**\n * Camelcase the the given module `name`.\n */\n\nfunction camelcase(str) {\n  if (str.length === 1) {\n    return str.toLowerCase();\n  }\n  str = str.replace(/^[\\W_]+|[\\W_]+$/g, '').toLowerCase();\n  return str.replace(/[\\W_]+(\\w|$)/g, function(_, ch) {\n    return ch.toUpperCase();\n  });\n}\n\n/**\n * Expose `lazyCache`\n */\n\nmodule.exports = lazyCache;\n"]}