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O,MAAM,SAAQ,IACnB,KAAK,cAAc,GACnB,EAAO,MAAM,UAAU,6BAAsC,IAE3D,EAAQ,CACN,GAAa,EAAU,SACzB,EAAO,MAAM,0DACb,QAAe,EAAU,OAAO,KAAK,KAAM,EAAQ,CACjD,SACA,IAAK,EACL,gBACA,SACA,aAGJ,MAAM,KACJ,EAAI,IACJ,EAAG,SACH,EAAQ,qBACR,GACE,EASJ,OARA,GAAsB,SAAQ,EAAE,MAC9B,KAAK,cAAc,GACnB,EAAO,MAAM,UAAU,6BAA+B,IAExD,EAAoB,SAAQ,IAC1B,UAAU,EAAY,EAAU,MAChC,EAAO,MAAM,gCAAgC,OAAO,MAAe,IAE9D,CAAC,EAAM,EAChB,CACF,CAGA,MAAO,CAAC,EAAQ,EAClB,CA/JA,OAAO,QAAU,aACjB,OAAO,QAAQ,OAAS","file":"/npm/babel-loader@10.0.0/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/babel-loader@10.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","let babel;\ntry {\n  babel = require(\"@babel/core\");\n} catch (err) {\n  if (err.code === \"MODULE_NOT_FOUND\") {\n    err.message += \"\\n babel-loader@9 requires Babel 7.12+ (the package '@babel/core'). \" + \"If you'd like to use Babel 6.x ('babel-core'), you should install 'babel-loader@7'.\";\n  }\n  throw err;\n}\n\n// Since we've got the reverse bridge package at @babel/core@6.x, give\n// people useful feedback if they try to use it alongside babel-loader.\nif (/^6\\./.test(babel.version)) {\n  throw new Error(\"\\n babel-loader@9 will not work with the '@babel/core@6' bridge package. \" + \"If you want to use Babel 6.x, install 'babel-loader@7'.\");\n}\nconst {\n  version\n} = require(\"../package.json\");\nconst cache = require(\"./cache\");\nconst transform = require(\"./transform\");\nconst injectCaller = require(\"./injectCaller\");\nconst schema = require(\"./schema\");\nconst {\n  isAbsolute\n} = require(\"path\");\nconst {\n  promisify\n} = require(\"util\");\nfunction subscribe(subscriber, metadata, context) {\n  if (context[subscriber]) {\n    context[subscriber](metadata);\n  }\n}\nmodule.exports = makeLoader();\nmodule.exports.custom = makeLoader;\nfunction makeLoader(callback) {\n  const overrides = callback ? callback(babel) : undefined;\n  return function (source, inputSourceMap) {\n    // Make the loader async\n    const callback = this.async();\n    loader.call(this, source, inputSourceMap, overrides).then(args => callback(null, ...args), err => callback(err));\n  };\n}\nasync function loader(source, inputSourceMap, overrides) {\n  const filename = this.resourcePath;\n  const logger = this.getLogger(\"babel-loader\");\n  let loaderOptions = this.getOptions(schema);\n  if (loaderOptions.customize != null) {\n    if (!isAbsolute(loaderOptions.customize)) {\n      throw new Error(\"Customized loaders must be passed as absolute paths, since \" + \"babel-loader has no way to know what they would be relative to.\");\n    }\n    if (overrides) {\n      throw new Error(\"babel-loader's 'customize' option is not available when already \" + \"using a customized babel-loader wrapper.\");\n    }\n    logger.debug(`loading customize override: '${loaderOptions.customize}'`);\n    let override = require(loaderOptions.customize);\n    if (override.__esModule) override = override.default;\n    if (typeof override !== \"function\") {\n      throw new Error(\"Custom overrides must be functions.\");\n    }\n    logger.debug(\"applying customize override to @babel/core\");\n    overrides = override(babel);\n  }\n  let customOptions;\n  if (overrides && overrides.customOptions) {\n    logger.debug(\"applying overrides customOptions() to loader options\");\n    const result = await overrides.customOptions.call(this, loaderOptions, {\n      source,\n      map: inputSourceMap\n    });\n    customOptions = result.custom;\n    loaderOptions = result.loader;\n  }\n\n  // Deprecation handling\n  if (\"forceEnv\" in loaderOptions) {\n    this.emitWarning(new Error(\"The option `forceEnv` has been removed in favor of `envName` in Babel 7.\"));\n  }\n  if (typeof loaderOptions.babelrc === \"string\") {\n    this.emitWarning(new Error(\"The option `babelrc` should not be set to a string anymore in the babel-loader config. \" + \"Please update your configuration and set `babelrc` to true or false.\\n\" + \"If you want to specify a specific babel config file to inherit config from \" + \"please use the `extends` option.\\nFor more information about this options see \" + \"https://babeljs.io/docs/#options\"));\n  }\n  logger.debug(\"normalizing loader options\");\n  // Standardize on 'sourceMaps' as the key passed through to Webpack, so that\n  // users may safely use either one alongside our default use of\n  // 'this.sourceMap' below without getting error about conflicting aliases.\n  if (Object.prototype.hasOwnProperty.call(loaderOptions, \"sourceMap\") && !Object.prototype.hasOwnProperty.call(loaderOptions, \"sourceMaps\")) {\n    loaderOptions = Object.assign({}, loaderOptions, {\n      sourceMaps: loaderOptions.sourceMap\n    });\n    delete loaderOptions.sourceMap;\n  }\n  const programmaticOptions = Object.assign({}, loaderOptions, {\n    filename,\n    inputSourceMap: inputSourceMap || loaderOptions.inputSourceMap,\n    // Set the default sourcemap behavior based on Webpack's mapping flag,\n    // but allow users to override if they want.\n    sourceMaps: loaderOptions.sourceMaps === undefined ? this.sourceMap : loaderOptions.sourceMaps,\n    // Ensure that Webpack will get a full absolute path in the sourcemap\n    // so that it can properly map the module back to its internal cached\n    // modules.\n    sourceFileName: filename\n  });\n  // Remove loader related options\n  delete programmaticOptions.customize;\n  delete programmaticOptions.cacheDirectory;\n  delete programmaticOptions.cacheIdentifier;\n  delete programmaticOptions.cacheCompression;\n  delete programmaticOptions.metadataSubscribers;\n  logger.debug(\"resolving Babel configs\");\n  const config = await babel.loadPartialConfigAsync(injectCaller(programmaticOptions, this.target));\n  if (config) {\n    let options = config.options;\n    if (overrides && overrides.config) {\n      logger.debug(\"applying overrides config() to Babel config\");\n      options = await overrides.config.call(this, config, {\n        source,\n        map: inputSourceMap,\n        customOptions\n      });\n    }\n    if (options.sourceMaps === \"inline\") {\n      // Babel has this weird behavior where if you set \"inline\", we\n      // inline the sourcemap, and set 'result.map = null'. This results\n      // in bad behavior from Babel since the maps get put into the code,\n      // which Webpack does not expect, and because the map we return to\n      // Webpack is null, which is also bad. To avoid that, we override the\n      // behavior here so \"inline\" just behaves like 'true'.\n      options.sourceMaps = true;\n    }\n    const {\n      cacheDirectory = null,\n      cacheIdentifier = \"core\" + transform.version + \",\" + \"loader\" + version,\n      cacheCompression = true,\n      metadataSubscribers = []\n    } = loaderOptions;\n    let result;\n    if (cacheDirectory) {\n      logger.debug(\"cache is enabled\");\n      const getFileTimestamp = promisify((path, cb) => {\n        this._compilation.fileSystemInfo.getFileTimestamp(path, cb);\n      });\n      const hash = this.utils.createHash(this._compilation.outputOptions.hashFunction);\n      result = await cache({\n        source,\n        options,\n        transform,\n        cacheDirectory,\n        cacheIdentifier,\n        cacheCompression,\n        hash,\n        getFileTimestamp,\n        logger\n      });\n    } else {\n      logger.debug(\"cache is disabled, applying Babel transform\");\n      result = await transform(source, options);\n    }\n    config.files.forEach(configFile => {\n      this.addDependency(configFile);\n      logger.debug(`added '${configFile}' to webpack dependencies`);\n    });\n    if (result) {\n      if (overrides && overrides.result) {\n        logger.debug(\"applying overrides result() to Babel transform results\");\n        result = await overrides.result.call(this, result, {\n          source,\n          map: inputSourceMap,\n          customOptions,\n          config,\n          options\n        });\n      }\n      const {\n        code,\n        map,\n        metadata,\n        externalDependencies\n      } = result;\n      externalDependencies?.forEach(([dep]) => {\n        this.addDependency(dep);\n        logger.debug(`added '${dep}' to webpack dependencies`);\n      });\n      metadataSubscribers.forEach(subscriber => {\n        subscribe(subscriber, metadata, this);\n        logger.debug(`invoked metadata subscriber '${String(subscriber)}'`);\n      });\n      return [code, map];\n    }\n  }\n\n  // If the file was ignored, pass through the original content.\n  return [source, inputSourceMap];\n}"]}