{"version":3,"sources":["jsdelivr-header.js","/npm/rewire-webpack@1.0.1/lib/RewirePlugin.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,IAAI,KAAO,QAAQ,QACf,kBAAoB,QAAQ,6CAC5B,2BAA6B,QAAQ,mCACrC,kBAAoB,QAAQ,0BAEhC,SAAS,eAAgB,CAEzB,aAAa,UAAU,MAAQ,SAAU,GAGrC,EAAS,OAAO,eAAe,SAAS,EAAa,GACjD,IAAI,EAAsB,EAAO,oBAC7B,EAA6B,IAAI,2BAA2B,GAEhE,EAAY,oBAAoB,IAAI,kBAAmB,GACvD,EAAY,oBAAoB,IAAI,kBAAmB,IAAI,kBAAkB,SACjF,IAGA,EAAS,OAAO,OAAO,cAAc,WACjC,OAAO,CACX,IAGA,EAAS,OAAO,OAAO,eAAe,SAAU,GAC5C,IAAI,EACA,EAEJ,OAA8B,IAA1B,EAAK,UAAU,YAInB,EAAQ,KAAK,mBAAmB,EAAK,UAAU,KACpC,cAIX,EAAM,IAAI,kBAAkB,EAAM,OAAQ,EAAM,QAC5C,IAAM,EAAK,IACf,KAAK,MAAM,QAAQ,cAAc,IAE1B,GACX,IAGA,EAAS,UAAU,OAAO,MAAM,IAAI,kBAAkB,CAClD,OAAQ,KAAK,KAAK,UAAW,mBAErC,EAEA,OAAO,QAAU","file":"/npm/rewire-webpack@1.0.1/lib/RewirePlugin.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/rewire-webpack@1.0.1/lib/RewirePlugin.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\";\r\n\r\nvar path = require(\"path\"),\r\n    ModuleAliasPlugin = require(\"enhanced-resolve/lib/ModuleAliasPlugin.js\"),\r\n    RewiredNormalModuleFactory = require(\"./RewiredNormalModuleFactory.js\"),\r\n    RewiredDependency = require(\"./RewiredDependency.js\");\r\n\r\nfunction RewirePlugin() {}\r\n\r\nRewirePlugin.prototype.apply = function (compiler) {\r\n    // wire our RewiredDependency to our RewiredNormalModuleFactory\r\n    // by decorating the original factory\r\n    compiler.plugin(\"compilation\", function(compilation, params) {\r\n        var normalModuleFactory = params.normalModuleFactory,\r\n            rewiredNormalModuleFactory = new RewiredNormalModuleFactory(normalModuleFactory);\r\n\r\n        compilation.dependencyFactories.set(RewiredDependency, rewiredNormalModuleFactory);\r\n        compilation.dependencyTemplates.set(RewiredDependency, new RewiredDependency.Template());\r\n    });\r\n\r\n    // accept \"var rewire\", elsewise it would not be parsed (as overwritten)\r\n    compiler.parser.plugin(\"var rewire\", function () {\r\n        return true;\r\n    });\r\n\r\n    // find rewire(request: String) calls and bind our RewiredDependency\r\n    compiler.parser.plugin(\"call rewire\", function (expr) {\r\n        var param,\r\n            dep;\r\n\r\n        if (expr.arguments.length !== 1) {\r\n            return false;\r\n        }\r\n\r\n        param = this.evaluateExpression(expr.arguments[0]);\r\n        if (!param.isString()) {\r\n            return false;\r\n        }\r\n\r\n        dep = new RewiredDependency(param.string, param.range);\r\n        dep.loc = expr.loc;\r\n        this.state.current.addDependency(dep);\r\n\r\n        return true;\r\n    });\r\n\r\n    // alias the require(\"rewire\") to a webpack rewire\r\n    compiler.resolvers.normal.apply(new ModuleAliasPlugin({\r\n        rewire: path.join(__dirname, \"rewire.web.js\")\r\n    }));\r\n};\r\n\r\nmodule.exports = RewirePlugin;"]}